package com.it.commicity.controller.sys;


import com.it.commicity.common.Result;
import com.it.commicity.domain.po.SysDictData;
import com.it.commicity.service.sys.ISysDictDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 字典数据表 前端控制器
 * </p>
 *
 * @author author
 * @since 2025-07-11
 */
@RestController
@RequestMapping("/api/dict")
public class SysDictDataController {

    @Autowired
    private ISysDictDataService dictDataService;

    @GetMapping("/getLabelList")
    public Result getLabelList() {
        List<SysDictData> list = dictDataService.getLabelListByTypes("zy_room_state");
        return Result.success(list);
    }

    @GetMapping("/getLabelListType")
    public Result getLabelListType() {
        List<SysDictData> list = dictDataService.getLabelListByTypes("zy_house_state");
        return Result.success(list);
    }
}
